home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 2
/
Merciful - Disc 2.iso
/
software
/
i
/
imagefxv2.1a.lha
/
ImageFX
/
Rexx
/
AutoFX
/
SaveBufferAs_MPEG.ifx
< prev
next >
Wrap
Text File
|
1996-03-02
|
1KB
|
63 lines
/*
* SaveBufferAs_MPEG.ifx
* Written by Thomas Krehbiel
*
* Encode an MPEG stream from a series of frames. Uses third-party
* MPEG encoder software.
*
* Inputs:
* Word(Arg(1),1) = Frame number (1 - N)
* Word(Arg(1),2) = Main filename ("-" if not specified)
* Word(Arg(1),3) = Swap filename ("-" if not specified)
* Word(Arg(1),4) = Sequence number
* Word(Arg(1),5) = Total number of frames (N)
*
* Returns:
* 0 if successful, non-zero on failure
*
*/
OPTIONS RESULTS
base = 'Autofx_MPEG_'
framenum = Word(Arg(1),1)
mainname = Word(Arg(1),2)
swapname = Word(Arg(1),3)
seqnum = Word(Arg(1),4)
framemax = Word(Arg(1),5)
newpath = GETCLIP(base||'Path')
neww = GETCLIP(base||'Width')
newh = GETCLIP(base||'Height')
xing = GETCLIP(base||'Xing')
IF RIGHT(newpath,1) ~= ':' THEN newpath = newpath || '/'
newname = newpath||'mpeg_temp'||framenum
/* fix: no longer assumes 'xing' is a boolean */
IF xing ~= 0 THEN DO
neww = 160
newh = 120
END
GetPrefs Undo
prevundo = result
Undo Off
GetPrefs SaveNails
prevnail = result
SetPrefs SaveNails Off
Scale neww newh
IF rc ~= 0 THEN EXIT rc
SaveBufferAs YUVSplit newname
IF rc ~= 0 THEN EXIT rc
SetPrefs SaveNails prevnail
Undo prevundo
EXIT